The _ssss_eeee_tttt_wwww_aaaa_iiii_tttt_jjjj_oooo_bbbb_pppp_iiii_dddd function sets a job to wait for a specified pid to call
the function _wwww_aaaa_iiii_tttt_jjjj_oooo_bbbb. If a job is set to wait for a pid, it remains
around after job termination until either the process with the pid calls
_wwww_aaaa_iiii_tttt_jjjj_oooo_bbbb or the process terminates. The _ssss_eeee_tttt_wwww_aaaa_iiii_tttt_jjjj_oooo_bbbb_pppp_iiii_dddd function takes two
arguements: the jid of the job to be set to wait and the pid of the
process that is expected to call _wwww_aaaa_iiii_tttt_jjjj_oooo_bbbb. The pid cannot be the process
calling the _ssss_eeee_tttt_wwww_aaaa_iiii_tttt_jjjj_oooo_bbbb_pppp_iiii_dddd function. If a jid of 0 is passed in, the
function will set the current job.
The _ssss_eeee_tttt_wwww_aaaa_iiii_tttt_jjjj_oooo_bbbb_pppp_iiii_dddd function checks the specified pid's process for the
CAP_SETUID capability. If called for another job, the _ssss_eeee_tttt_wwww_aaaa_iiii_tttt_jjjj_oooo_bbbb_pppp_iiii_dddd
function checks for CAP_MAC_WRITE and CAP_PROC_MGT capability. See the
capability(4) and capabilities(4) man pages for more information on the
capability mechanism that provides fine grained control over the
privileges of a process.
The _ssss_eeee_tttt_wwww_aaaa_iiii_tttt_jjjj_oooo_bbbb_pppp_iiii_dddd function returns 0 if successful.
EEEERRRRRRRROOOORRRRSSSS
Under the following conditions, the function _ffff_4444_ssss_eeee_tttt_wwww_aaaa_iiii_tttt_jjjj_oooo_bbbb_pppp_iiii_dddd sets _e_r_r_n_o
to:
[ENOPKG] The job limits software is not installed.
[EINVAL] Set if pid of current process entered as an argument or
jid specified is the pid's job.
[ESRCH] The pid is invalid.
[EPERM] If calling process or entered pid do not have capability.
[ENOJOB] Set if jid is invalid.
SSSSEEEEEEEE AAAALLLLSSSSOOOO
systune(1M), waitjob(2).
DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
Upon successful completion, _s_e_t_w_a_i_t_j_o_b_p_i_d returns 0. If an error occurs,
a value of -1 is returned and eeeerrrrrrrrnnnnoooo is set to indicate the error.